package game;

public class Coordinate {
	private int x;
	private int y;
	
	public Coordinate(int x, int y) {
		this.x = x;
		this.y = y;
	}
	
	public int getX() {
		return x;
	}
	
	public int getY() {
		return y;
	}
	
	@Override
	public int hashCode() {
		return 100*x + y;
	}
	
	@Override
	public boolean equals(Object c) {
		if (c == null) return false;
		if (!(c instanceof Coordinate)) return false;
		return (((Coordinate)c).getX() == x && 
				((Coordinate)c).getY() == y);
	}
}
